package com.aoyy.util.order;

import java.util.List;
import java.util.ArrayList;
/**=========================================
 * <code>Payment</code> enum
 * @author Administrator
 * @date 2017-07-12
 * ========================================= */
public enum Payment {
  INTERNET_BLANKING {
	@Override
	public String getName() {
	  return "Internet Blanking";	
	}
  },
  PAYPAL {
	@Override
	public String getName() {
      return "PayPal";		
	}
  },
  PAYMENT_BY_POST_OFFICE {
	@Override
	public String getName() {
      return "Payment by Post Office";		
	}
  },
  CASH_ON_DELIVERY {
	@Override
	public String getName() {
      return "Cash on Delivery";		
	}
  };
	
  public abstract String getName();
  
  public static List<String> getNames() {
	List<String> list = new ArrayList<String>();
	Payment[] payments = Payment.values();
	for (Payment payment: payments) {
	  list.add(payment.getName());	
	}
	return list;
  }

}
